package wyu.service;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.entity.PostReply;
import org.springframework.stereotype.Service;
import wyu.mapper.PostReplyMapper;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PostReplyServiceImpl extends ServiceImpl<PostReplyMapper, PostReply> implements PostReplyService {
    @Resource
    PostReplyMapper postReplyMapper;
    @Override
    public Integer getReplyNum(long postId) {
        Integer count = query().eq("POST_ID", postId).count();
        return count;
    }

    @Override
    public List<Integer> orderByReplyNum() {
        return postReplyMapper.orderByReplyNum();
    }
}
